FILE(GLOB_RECURSE cc_sources *.cc)

add_library(buolamedia SHARED ${cc_sources})

target_link_libraries(buolamedia blackbox)

if(BUOLA_HAVE_FFMPEG)
    target_link_libraries(buolamedia ${AVCODEC_LIBRARIES} ${AVFORMAT_LIBRARIES} ${AVUTIL_LIBRARIES} ${SWSCALE_LIBRARIES})
endif()

if(BUOLA_HAVE_PULSE)
    target_link_libraries(buolamedia ${PULSEAUDIO_LIBRARY})
endif()

if(BUOLA_HAVE_MAD)
    target_link_libraries(buolamedia ${LIB_MAD})
endif()

if(BUOLA_HAVE_DC1394)
    target_link_libraries(buolamedia ${LIB_DC1394})
endif()

set_target_properties(buolamedia PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
install(TARGETS buolamedia DESTINATION ${LIB_INSTALL_DIR})
